home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / emacssrc.zip / EMACSSRC.TAR / emacs-19.17 / makefile.in < prev    next >
Makefile  |  1993-07-23  |  22KB  |  542 lines

  1. # DIST: This is the distribution Makefile for Emacs.  configure can
  2. # DIST: make most of the changes to this file you might want, so try
  3. # DIST: that first.
  4.  
  5. # make all    to compile and build Emacs.
  6. # make install    to install it.
  7. # make TAGS    to update tags tables.
  8. #
  9. # make clean  or  make mostlyclean
  10. #      Delete all files from the current directory that are normally
  11. #      created by building the program.     Don't delete the files that
  12. #      record the configuration.  Also preserve files that could be made
  13. #      by building, but normally aren't because the distribution comes
  14. #      with them.
  15. #
  16. #      Delete `.dvi' files here if they are not part of the distribution.
  17. # make distclean
  18. #      Delete all files from the current directory that are created by
  19. #      configuring or building the program.  If you have unpacked the
  20. #      source and built the program without creating any other files,
  21. #      `make distclean' should leave only the files that were in the
  22. #      distribution.
  23. # make realclean
  24. #      Delete everything from the current directory that can be
  25. #      reconstructed with this Makefile.  This typically includes
  26. #      everything deleted by distclean, plus more: C source files
  27. #      produced by Bison, tags tables, info files, and so on.
  28. #
  29. # make extraclean
  30. #      Still more severe - delete backup and autosave files, too.
  31.  
  32. SHELL = /bin/sh
  33. MAKE = make  # BSD doesn't have it as a default.
  34.  
  35. # ==================== Things `configure' Might Edit ====================
  36.  
  37. CC=@CC@
  38. CPP=@CPP@
  39. C_SWITCH_SYSTEM=@c_switch_system@
  40. ALLOCA=@ALLOCA@
  41. LN_S=@LN_S@
  42. CFLAGS=@CFLAGS@
  43. C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
  44. LD_SWITCH_X_SITE=@LD_SWITCH_X_SITE@
  45. YACC=@YACC@
  46.  
  47. ### These help us choose version- and architecture-specific directories
  48. ### to install files in.
  49.  
  50. ### This should be the number of the Emacs version we're building,
  51. ### like `18.59' or `19.0'.
  52. version=@version@
  53.  
  54. ### This should be the name of the configuration we're building Emacs
  55. ### for, like `mips-dec-ultrix' or `sparc-sun-sunos'.
  56. configuration=@configuration@
  57.  
  58. ### Libraries which should be edited into lib-src/Makefile.
  59. libsrc_libs=@libsrc_libs@
  60.  
  61. # ==================== Where To Install Things ====================
  62.  
  63. # The default location for installation.  Everything is placed in
  64. # subdirectories of this directory.  The default values for many of
  65. # the variables below are expressed in terms of this one, so you may
  66. # not need to change them.  This defaults to /usr/local.
  67. prefix=@prefix@
  68.  
  69. # Like `prefix', but used for architecture-specific files.
  70. exec_prefix=@exec_prefix@
  71.  
  72. # Where to install Emacs and other binaries that people will want to
  73. # run directly (like etags).
  74. bindir=${exec_prefix}/bin
  75.  
  76. # Where to install architecture-independent data files.     ${lispdir}
  77. # and ${etcdir} are subdirectories of this.
  78. datadir=${prefix}/lib
  79.  
  80. # Where to install and expect the files that Emacs modifies as it
  81. # runs.     These files are all architecture-independent. Right now, the
  82. # only such data is the locking directory; ${lockdir} is a
  83. # subdirectory of this.
  84. statedir=${prefix}/lib
  85.  
  86. # Where to install and expect executable files to be run by Emacs
  87. # rather than directly by users, and other architecture-dependent
  88. # data.     ${archlibdir} is a subdirectory of this.
  89. libdir=${exec_prefix}/lib
  90.  
  91. # Where to install Emacs's man pages, and what extension they should have.
  92. mandir=${prefix}/man/man1
  93. manext=.1
  94.  
  95. # Where to install and expect the info files describing Emacs.    In the
  96. # past, this defaulted to a subdirectory of ${prefix}/lib/emacs, but
  97. # since there are now many packages documented with the texinfo
  98. # system, it is inappropriate to imply that it is part of Emacs.
  99. infodir=${prefix}/info
  100.  
  101. # Where to find the source code.  The source code for Emacs's C kernel is
  102. # expected to be in ${srcdir}/src, and the source code for Emacs's
  103. # utility programs is expected to be in ${srcdir}/lib-src.  This is
  104. # set by the configure script's `--srcdir' option.
  105. srcdir=@srcdir@
  106.  
  107. # ==================== Emacs-specific directories ====================
  108.  
  109. # These variables hold the values Emacs will actually use.  They are
  110. # based on the values of the standard Make variables above.
  111.  
  112. @inst_paths@# Where to install the lisp files distributed with
  113. @inst_paths@# Emacs.  This includes the Emacs version, so that the
  114. @inst_paths@# lisp files for different versions of Emacs will install
  115. @inst_paths@# themselves in separate directories.
  116. @inst_paths@lispdir=${datadir}/emacs/${version}/lisp
  117.  
  118. @inst_paths@# Directories Emacs should search for lisp files specific
  119. @inst_paths@# to this site (i.e. customizations), before consulting
  120. @inst_paths@# ${lispdir}.  This should be a colon-separated list of
  121. @inst_paths@# directories.
  122. @inst_paths@locallisppath=${datadir}/emacs/site-lisp
  123.  
  124. # Where Emacs will search to find its lisp files.  Before
  125. # changing this, check to see if your purpose wouldn't
  126. # better be served by changing locallisppath.  This
  127. # should be a colon-separated list of directories.
  128. lisppath=${locallisppath}:${lispdir}
  129.  
  130. # Where Emacs will search for its lisp files while
  131. # building.  This is only used during the process of
  132. # compiling Emacs, to help Emacs find its lisp files
  133. # before they've been installed in their final location.
  134. # It's usually identical to lisppath, except that the
  135. # entry for the directory containing the installed lisp
  136. # files has been replaced with ../lisp.  This should be a
  137. # colon-separated list of directories.
  138. buildlisppath=${srcdir}/lisp
  139.  
  140. @inst_paths@# Where to install the other architecture-independent
  141. @inst_paths@# data files distributed with Emacs (like the tutorial,
  142. @inst_paths@# the cookie recipes and the Zippy database). This path
  143. @inst_paths@# usually contains the Emacs version number, so the data
  144. @inst_paths@# files for multiple versions of Emacs may be installed
  145. @inst_paths@# at once.
  146. @inst_paths@etcdir=${datadir}/emacs/${version}/etc
  147.  
  148. @inst_paths@# Where to create and expect the locking directory, where
  149. @inst_paths@# the Emacs locking code keeps track of which files are
  150. @inst_paths@# currently being edited.
  151. @inst_paths@lockdir=${statedir}/emacs/lock
  152.  
  153. @inst_paths@# Where to put executables to be run by Emacs rather than
  154. @inst_paths@# the user.  This path usually includes the Emacs version
  155. @inst_paths@# and configuration name, so that multiple configurations
  156. @inst_paths@# for multiple versions of Emacs may be installed at
  157. @inst_paths@# once.
  158. @inst_paths@archlibdir=${libdir}/emacs/${version}/${configuration}
  159.  
  160. # ====================== Developer's configuration =======================
  161.  
  162. # The following assignments make sense if you're running Emacs on a single
  163. # machine, one version at a time, and  you want changes to the lisp and etc
  164. # directories in the source tree to show up immediately in your working
  165. # environment.  It saves a great deal of disk space by not duplicating the
  166. # lisp and etc directories.
  167.  
  168. @rip_paths@lispdir=${srcdir}/lisp
  169. @rip_paths@externallispdir=${srcdir}/externallisp
  170. @rip_paths@locallisppath=${srcdir}/site-lisp:${datadir}/emacs/site-lisp
  171. @rip_paths@etcdir=${srcdir}/etc
  172. @rip_paths@lockdir=${srcdir}/lock
  173. @rip_paths@archlibdir=${srcdir}/lib-src
  174. @rip_paths@infodir=${srcdir}/info
  175.  
  176. # ==================== Utility Programs for the Build ====================
  177.  
  178. # Allow the user to specify the install program.
  179. INSTALL = @INSTALL@
  180. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  181. INSTALL_DATA = @INSTALL_DATA@
  182.  
  183. # ============================= Targets ==============================
  184.  
  185. # Flags passed down to subdirectory makefiles.
  186. MFLAGS = 
  187.  
  188. # Subdirectories to make recursively.  `lisp' is not included
  189. # because the compiled lisp files are part of the distribution
  190. # and you cannot remake them without installing Emacs first.
  191. SUBDIR = lib-src src
  192.  
  193. # The makefiles of the directories in $SUBDIR.
  194. SUBDIR_MAKEFILES = lib-src/Makefile src/Makefile oldXMenu/Makefile
  195.  
  196. # Subdirectories to install, and where they'll go.
  197. # lib-src's makefile knows how to install it, so we don't do that here.
  198. # When installing the info files, we need to do special things to
  199. # avoid nuking an existing dir file, so we don't do that here;
  200. # instead, we have written out explicit code in the `install' targets.
  201. COPYDIR = ${srcdir}/etc ${srcdir}/lisp
  202. COPYDESTS = ${etcdir} ${lispdir}
  203.  
  204. all:    src/paths.h ${SUBDIR}
  205.  
  206. removenullpaths=sed -e 's/^://' -e 's/:$$//' -e 's/::/:/'
  207.  
  208. # We force the rebuilding of src/paths.h because the user might give
  209. # make different values for the various directories.  Since we use
  210. # move-if-change, src/paths.h only actually changes if the user did
  211. # something notable, so the only unnecessary work we do is in building
  212. # src/paths.h.tmp, which isn't much.
  213. # Note that sed is not in /bin on 386bsd.
  214. src/paths.h: Makefile ${srcdir}/src/paths.h.in FRC.src.paths.h
  215.     @echo "Producing \`src/paths.h' from \`src/paths.h.in'."
  216.     @(lisppath=`echo ${lisppath} | ${removenullpaths}` ;        \
  217.       buildlisppath=`echo ${buildlisppath} | ${removenullpaths}` ;    \
  218.       sed < ${srcdir}/src/paths.h.in > src/paths.h.tmp        \
  219.       -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'$${lisppath}'";'    \
  220.       -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${buildlisppath}'";' \
  221.       -e 's;\(#.*PATH_EXEC\).*$$;\1 "${archlibdir}";'        \
  222.       -e 's;\(#.*PATH_INFO\).*$$;\1 "${infodir}";'            \
  223.       -e 's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";'            \
  224.       -e 's;\(#.*PATH_LOCK\).*$$;\1 "${lockdir}/";')
  225.     @${srcdir}/move-if-change src/paths.h.tmp src/paths.h
  226.  
  227. src:    lib-src FRC.src
  228. lib-src: FRC.lib-src
  229.  
  230. .RECURSIVE: ${SUBDIR}
  231.  
  232. ${SUBDIR}: ${SUBDIR_MAKEFILES} FRC
  233.     cd $@; $(MAKE) all ${MFLAGS} \
  234.         CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
  235.         prefix='${prefix}' srcdir='${srcdir}/$@' libdir='${libdir}'
  236.  
  237. ## We build the makefiles for the subdirectories here so that we can
  238. ## edit the values for the path variables into them.  This means that
  239. ## when the user has built them from this makefile once, they will use
  240. ## the right default values for the path variables.
  241. lib-src/Makefile: ${srcdir}/lib-src/Makefile.in Makefile
  242.     rm -f lib-src/Makefile.tmp
  243.     @echo "Producing \`lib-src/Makefile' from \`${srcdir}/lib-src/Makefile.in'."
  244.     @(echo "# This file is generated from \`${srcdir}/lib-src/Makefile.in'." ; \
  245.       echo "# If you are thinking about editing it, you should seriously consider" ; \
  246.       echo "# running \`make lib-src/Makefile' at the top of the" ;    \
  247.       echo "# Emacs build tree instead, or editing" ;        \
  248.       echo "# \`${srcdir}/lib-src/Makefile.in' itself." ;        \
  249.       sed < ${srcdir}/lib-src/Makefile.in                \
  250.       -e 's|^\(version *=\).*$$|\1'"${version}"'|'            \
  251.       -e 's|^\(configname *=\).*$$|\1'"${configuration}"'|'        \
  252.       -e 's|^\(prefix *=\).*$$|\1'"${prefix}"'|'            \
  253.       -e 's|^\(exec_prefix *=\).*$$|\1'"${exec_prefix}"'|'        \
  254.       -e 's|^\(libdir *=\).*$$|\1'"${libdir}"'|'            \
  255.       -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'/lib-src|'        \
  256.       -e 's|^\(VPATH *=\).*$$|\1'"${srcdir}"'/lib-src|'        \
  257.       -e 's|^\(archlibdir *=\).*$$|\1'"${archlibdir}"'|'        \
  258.       -e 's|^\(ALLOCA *=\).*$$|\1'"${ALLOCA}"'|'            \
  259.       -e 's|^\(YACC *=\).*$$|\1'"${YACC}"'|'            \
  260.       -e 's|^CC *=.*$$|CC='"${CC}"'|'                \
  261.       -e 's|^CFLAGS *=.*$$|CFLAGS='"${CFLAGS}"'|' \
  262.       -e 's|^C_SWITCH_SYSTEM *=.*$$|C_SWITCH_SYSTEM='"${C_SWITCH_SYSTEM}"'|' \
  263.       -e 's|^LOADLIBES *=.*$$|LOADLIBES='"${libsrc_libs}"'|'    \
  264.       -e '/^# DIST: /d') > lib-src/Makefile.tmp
  265.     @${srcdir}/move-if-change lib-src/Makefile.tmp lib-src/Makefile
  266.     chmod -w lib-src/Makefile
  267.  
  268. src/Makefile: ${srcdir}/src/Makefile.in Makefile
  269.     rm -f src/Makefile.tmp
  270.     @echo "Producing \`src/Makefile' from \`${srcdir}/src/Makefile.in'."
  271.     @(echo "# This file is generated from \`${srcdir}/src/Makefile.in'." ; \
  272.       echo "# If you are thinking about editing it, you should seriously consider" ; \
  273.       echo "# running \`make src/Makefile' at the top of the" ;    \
  274.       echo "# Emacs build tree instead, or editing" ;        \
  275.       echo "# \`${srcdir}/src/Makefile.in' itself." ;        \
  276.       sed < ${srcdir}/src/Makefile.in                \
  277.       -e 's|^\(srcdir *=\).*$$|\1${srcdir}/src|'            \
  278.       -e 's|^\(VPATH *=\).*$$|\1${srcdir}/src|'            \
  279.       -e 's|^CC *=.*$$|CC=${CC}|'                    \
  280.       -e 's|^CPP *=.*$$|CPP=${CPP}|'                \
  281.       -e 's|^LN_S *=.*$$|LN_S=${LN_S}|'                \
  282.       -e 's|^CFLAGS *=.*$$|CFLAGS=${CFLAGS}|'             \
  283.       -e 's|^\(C_SWITCH_SYSTEM *=\).*$$|\1'"${C_SWITCH_SYSTEM}"'|'    \
  284.       -e 's|^\(LD_SWITCH_X_SITE *=\).*$$|\1${LD_SWITCH_X_SITE}|'    \
  285.       -e '/^# DIST: /d') > src/Makefile.tmp
  286.     @${srcdir}/move-if-change src/Makefile.tmp src/Makefile
  287.     chmod -w src/Makefile
  288.  
  289. oldXMenu/Makefile: ${srcdir}/oldXMenu/Makefile.in Makefile
  290.     rm -f oldXMenu/Makefile.tmp
  291.     @echo "Producing \`oldXMenu/Makefile' from \`${srcdir}/oldXMenu/Makefile.in'."
  292.     @(echo "# This file is generated from \`${srcdir}/oldXMenu/Makefile.in'." ; \
  293.       echo "# If you are thinking about editing it, you should seriously consider" ; \
  294.       echo "# running \`make oldXMenu/Makefile' at the top of the" ; \
  295.       echo "# Emacs build tree instead, or editing" ;        \
  296.       echo "# \`${srcdir}/oldXMenu/Makefile.in' itself." ;        \
  297.       sed < ${srcdir}/oldXMenu/Makefile.in                \
  298.       -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'/oldXMenu|'        \
  299.       -e 's|^\(VPATH *=\).*$$|\1'"${srcdir}"'/oldXMenu|'        \
  300.       -e 's|^\(C_SWITCH_X_SITE *=\).*$$|\1'"${C_SWITCH_X_SITE}"'|'    \
  301.       -e 's|^CC *=.*$$|CC='"${CC}"'|'                \
  302.       -e 's|^DEFS *=.*$$|DEFS='"${DEFS}"'|' \
  303.       -e '/^# DIST: /d') > oldXMenu/Makefile.tmp
  304.     @${srcdir}/move-if-change oldXMenu/Makefile.tmp oldXMenu/Makefile
  305.     chmod -w oldXMenu/Makefile
  306.  
  307. Makefile:
  308.     ./config.status
  309.  
  310. # ==================== Installation ====================
  311.  
  312. ## If we let lib-src do its own installation, that means we
  313. ## don't have to duplicate the list of utilities to install in
  314. ## this Makefile as well.
  315.  
  316. ## On AIX, use tar xBf.
  317. ## On Xenix, use tar xpf.
  318.  
  319. ## We delete each directory in ${COPYDESTS} before we copy into it;
  320. ## that way, we can reinstall over directories that have been put in
  321. ## place with their files read-only (perhaps because they are checked
  322. ## into RCS).  In order to make this safe, we make sure that the
  323. ## source exists and is distinct from the destination.
  324. install: all do-install
  325.  
  326. ### Note that we copy the DOC-* files from the build etc directory
  327. ### as well as lots of things from ${srcdir}/etc.
  328. do-install: mkdir
  329.     (cd lib-src; \
  330.       $(MAKE) install ${MFLAGS} prefix=${prefix} \
  331.         exec_prefix=${exec_prefix} bindir=${bindir} libdir=${libdir} \
  332.         archlibdir=${archlibdir})
  333.     -set ${COPYDESTS} ; \
  334.      for dir in ${COPYDIR} ; do \
  335.        if [ `(cd $$1 && pwd)` != `(cd $${dir} && pwd)` ] ; then \
  336.          rm -rf $$1 ; \
  337.        fi ; \
  338.        shift ; \
  339.      done
  340.     -set ${COPYDESTS} ; \
  341.      mkdir ${COPYDESTS} ; \
  342.      for dir in ${COPYDIR} ; do \
  343.        dest=$$1 ; shift ; \
  344.        [ -d $${dir} ] \
  345.        && [ `(cd $${dir} && /bin/pwd)` != `(cd $${dest} && /bin/pwd)` ] \
  346.        && (echo "Copying $${dir}..." ; \
  347.            (cd $${dir}; tar -cf - . )|(cd $${dest};umask 0; tar -xvf - ); \
  348.            for subdir in `find $${dest} -type d ! -name RCS -print` ; do \
  349.          rm -rf $${subdir}/RCS ; \
  350.          rm -rf $${subdir}/CVS ; \
  351.          rm -f  $${subdir}/\#* ; \
  352.          rm -f  $${subdir}/*~ ; \
  353.            done) ; \
  354.      done
  355.     if [ `(cd ./etc; /bin/pwd)` != `(cd ${srcdir}/etc; /bin/pwd)` ]; \
  356.     then \
  357.        echo "Copying etc/DOC* ..." ; \
  358.        (cd etc; tar -cf - DOC*)|(cd ${etcdir}; umask 0; tar -xvf - ); \
  359.     else true; fi
  360.     if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \
  361.     then (cd ${srcdir}/info ; \
  362.          if [ ! -f ${infodir}/dir ] && [ -f dir ]; then \
  363.            ${INSTALL_DATA} dir ${infodir}/dir ; \
  364.          fi ; \
  365.          for f in cl* emacs* forms* info* vip* ; do \
  366.            ${INSTALL_DATA} $$f ${infodir}/$$f ; \
  367.          done); \
  368.     else true; fi
  369.     cd ${srcdir}/etc; for page in emacs etags ctags ; do \
  370.       ${INSTALL_DATA} $${page}.1 ${mandir}/$${page}${manext} ; \
  371.     done
  372.     ${INSTALL_PROGRAM} src/emacs ${bindir}/emacs-${version}
  373.     chmod 1755  ${bindir}/emacs-${version}
  374.     rm -f ${bindir}/emacs
  375.     ln ${bindir}/emacs-${version} ${bindir}/emacs
  376.  
  377. ### Build all the directories we're going to install Emacs in.    Since
  378. ### we may be creating several layers of directories (for example,
  379. ### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use make-path
  380. ### instead of mkdir.  Not all systems' mkdirs have the `-p' flag.
  381. mkdir: FRC.mkdir
  382.     ./lib-src/make-path ${COPYDESTS} ${lockdir} ${infodir} ${mandir} \
  383.       ${bindir} ${datadir} ${libdir} \
  384.       `echo ${locallisppath} | sed 's/:/ /'`
  385.     chmod 777 ${COPYDESTS} ${lockdir}
  386.  
  387. ### Delete all the installed files that the `install' target would
  388. ### create (but not the noninstalled files such as `make all' would
  389. ### create).
  390. ###
  391. ### Don't delete the lisp and etc directories if they're in the source tree.
  392. uninstall:
  393.     (cd lib-src;                     \
  394.      $(MAKE) ${MFLAGS} uninstall            \
  395.         prefix=${prefix} exec_prefix=${exec_prefix}    \
  396.         bindir=${bindir} libdir=${libdir} archlibdir=${archlibdir})
  397.     for dir in ${lispdir} ${etcdir} ; do         \
  398.       case `(cd $${dir} ; pwd)` in            \
  399.         `(cd ${srcdir} ; pwd)`* ) ;;        \
  400.         * ) rm -rf $${dir} ;;            \
  401.       esac ;                    \
  402.       case $${dir} in                \
  403.         ${datadir}/emacs/${version}/* )        \
  404.           rm -rf ${datadir}/emacs/${version}    \
  405.         ;;                        \
  406.       esac ;                    \
  407.     done
  408.     (cd ${infodir}; rm -f cl* emacs* forms* info* vip*)
  409.     (cd ${mandir};  rm -f emacs.1 etags.1 ctags.1)
  410.     (cd ${bindir};  rm -f emacs-${version} emacs)
  411.  
  412.  
  413. ### Some makes seem to remember that they've built something called FRC,
  414. ### so you can only use a given FRC once per makefile.
  415. FRC FRC.src.paths.h FRC.src FRC.lib-src FRC.mkdir:
  416. FRC.mostlyclean FRC.clean FRC.distclean FRC.realclean:
  417.  
  418. # ==================== Cleaning up and miscellanea ====================
  419.  
  420. ### `mostlyclean'
  421. ###      Like `clean', but may refrain from deleting a few files that people
  422. ###      normally don't want to recompile.  For example, the `mostlyclean'
  423. ###      target for GCC does not delete `libgcc.a', because recompiling it
  424. ###      is rarely necessary and takes a lot of time.
  425. mostlyclean: FRC.mostlyclean
  426.     (cd src;      make ${MFLAGS} mostlyclean)
  427.     (cd oldXMenu; make ${MFLAGS} mostlyclean)
  428.     (cd lib-src;  make ${MFLAGS} mostlyclean)
  429.     (cd man;      make ${MFLAGS} mostlyclean)
  430.  
  431. ### `clean'
  432. ###      Delete all files from the current directory that are normally
  433. ###      created by building the program.  Don't delete the files that
  434. ###      record the configuration.  Also preserve files that could be made
  435. ###      by building, but normally aren't because the distribution comes
  436. ###      with them.
  437. ### 
  438. ###      Delete `.dvi' files here if they are not part of the distribution.
  439. clean: FRC.clean
  440.     (cd src;      make ${MFLAGS} clean)
  441.     (cd oldXMenu; make ${MFLAGS} clean)
  442.     (cd lib-src;  make ${MFLAGS} clean)
  443.     (cd man;      make ${MFLAGS} clean)
  444.  
  445. ### `distclean'
  446. ###      Delete all files from the current directory that are created by
  447. ###      configuring or building the program.  If you have unpacked the
  448. ###      source and built the program without creating any other files,
  449. ###      `make distclean' should leave only the files that were in the
  450. ###      distribution.
  451. top_distclean=\
  452.     rm -f config.status build-install ; \
  453.     rm -f Makefile ${SUBDIR_MAKEFILES} ; \
  454.     (cd lock ; rm -f *)
  455. distclean: FRC.distclean
  456.     (cd src;      make ${MFLAGS} distclean)
  457.     (cd oldXMenu; make ${MFLAGS} distclean)
  458.     (cd lib-src;  make ${MFLAGS} distclean)
  459.     (cd man;      make ${MFLAGS} distclean)
  460.     ${top_distclean}
  461.     
  462.  
  463. ### `realclean'
  464. ###      Delete everything from the current directory that can be
  465. ###      reconstructed with this Makefile.  This typically includes
  466. ###      everything deleted by distclean, plus more: C source files
  467. ###      produced by Bison, tags tables, info files, and so on.
  468. ### 
  469. ###      One exception, however: `make realclean' should not delete
  470. ###      `configure' even if `configure' can be remade using a rule in the
  471. ###      Makefile.  More generally, `make realclean' should not delete
  472. ###      anything that needs to exist in order to run `configure' and then
  473. ###      begin to build the program.
  474. realclean: FRC.realclean
  475.     (cd src;      make ${MFLAGS} realclean)
  476.     (cd oldXMenu; make ${MFLAGS} realclean)
  477.     (cd lib-src;  make ${MFLAGS} realclean)
  478.     (cd man;      make ${MFLAGS} realclean)
  479.     ${top_distclean}
  480.  
  481. ### This doesn't actually appear in the coding standards, but Karl
  482. ### says GCC supports it, and that's where the configuration part of
  483. ### the coding standards seem to come from.  It's like distclean, but
  484. ### it deletes backup and autosave files too.
  485. extraclean:
  486.     for i in ${SUBDIR}; do (cd $$i; $(MAKE) ${MFLAGS} extraclean); done
  487.     -(cd lock; rm *)
  488.     -rm config.status config-tmp-*
  489.     -rm -f *~ \#*
  490.  
  491. ### Unlocking and relocking.  The idea of these productions is to reduce
  492. ### hassles when installing an incremental tar of Emacs.  Do `make unlock'
  493. ### before unlocking the file to take the write locks off all sources so
  494. ### that tar xvof will overwrite them without fuss.  Then do `make relock'
  495. ### afterward so that VC mode will know which files should be checked in
  496. ### if you want to mung them.
  497. ###
  498. ### Note: it's no disaster if these productions miss a file or two; tar
  499. ### and VC will swiftly let you know if this happens, and it is easily
  500. ### corrected.
  501. SOURCES = ChangeLog GETTING.GNU.SOFTWARE INSTALL Makefile.in PROBLEMS \
  502.     README build-install.in configure make-dist move-if-change
  503.  
  504. unlock:
  505.     chmod u+w $(SOURCES) cpp/*
  506.     -(cd elisp; chmod u+w Makefile README *.texi)
  507.     (cd etc; make unlock)
  508.     (cd lib-src; make unlock)
  509.     (cd lisp; make unlock)
  510.     (cd lisp/term; chmod u+w README *.el)
  511.     (cd man; chmod u+w *texi* ChangeLog split-man)
  512.     (cd oldXMenu; chmod u+w *.[ch] Makefile README)
  513.     (cd src; make unlock)
  514.  
  515. relock:
  516.     chmod u-w $(SOURCES) cpp/*
  517.     -(cd elisp; chmod u-w Makefile README *.texi)
  518.     (cd etc; make relock)
  519.     (cd lib-src; make relock)
  520.     (cd lisp; make relock)
  521.     (cd lisp/term; chmod u+w README *.el)
  522.     (cd man; chmod u+w *texi* ChangeLog split-man)
  523.     (cd oldXMenu; chmod u+w *.[ch] Makefile README)
  524.     (cd src; make relock)
  525.  
  526. TAGS tags:    lib-src
  527.     (cd ${srcdir}/src; \
  528.      ../lib-src/etags *.[ch] ../lisp/*.el ../lisp/term/*.el)
  529.  
  530. check:
  531.     @echo "We don't have any tests for GNU Emacs yet."
  532.  
  533. dist:
  534.     cd ${srcdir}; make-dist
  535.  
  536. info:
  537.     (cd ${srcdir}/man; make ${MFLAGS} info)
  538. dvi:
  539.     (cd ${srcdir}/man; make ${MFLAGS} dvi)
  540.